
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j" %>

<f:subview id="loginLec">
    <rich:panel id="autenticar">
        <rich:panel rendered="#{mbLector.lec==null}" id="logeo">
            <h:form id="formLogeoLec"> 
                <table>
                    <tr>
                        <td align="right"> 
                            <h:outputText value="Login : " />
                            <h:inputText value="#{mbLector.sLec_codigo}" style="width: 100px" />
                            <h:outputText value=" Password : " />
                            <h:inputSecret value="#{mbLector.sLec_password}" style="width: 100px"/>
                            <a4j:commandButton value="Ingresar" actionListener="#{mbLector.verificarLector}" 
                                               styleClass="button" 
                                               reRender="autenticar"/>
                        </td> 
                    </tr> 

                </table>
            </h:form>
        </rich:panel>

        <rich:panel rendered="#{mbLector.lec!=null}" id="logeado">
            <h:form>
                <h:outputText value="Codigo : #{mbLector.lec.lecCodigo} " />
                <a4j:commandLink value="SALIR" action="#{mbLector.cerrar}" title="SALIR" />
            </h:form>
        </rich:panel>
    </rich:panel>
</f:subview> 